﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Domain.Model;
using Infrastructure;
using Resource;

namespace Domain.Repositories
{
	/// <summary>
	///     Maintains a contact list, offers the information what the communication
	///     need.
	/// </summary>
	public class ContactManager
	{
		//TODO: initialize CommunicationPoint value of Myself.
		//TODO: every contact has an unique ID.
		//TODO: contacts will be transfered between the clients.
		public static Contact Myself = new Contact
			{
				ID = Guid.NewGuid(),
				Nickname = CommunicationPoint.Myself.Username,
				CommunicationPoint = CommunicationPoint.Myself
			};

		public readonly ICollection<Contact> Contacts = new Collection<Contact> {Myself};

		// Handler for message SomeoneConnected
		public void Add(Contact contact)
		{
			//TODO: add new contact into contacts list.
		}

		// Handler for message SomeoneDisconnected 
		public void Remove(Contact contact)
		{
			//TODO: remove the contact from contacts list.
		}

		// Handler for message SomeoneChanged
		public void Update(Contact contact)
		{
			//TODO: update the contact info stored in the contacts list.
		}
	}
}